const Router = require('koa-router')
const routerIndex = require('./api')
const routerUsers = require('./users')
const routerHome = require('./home')
const loginRouter = require('./login')

const router = new Router()
router.use('/api', routerIndex.routes(), routerIndex.allowedMethods())
router.use('/users', routerUsers.routes(), routerUsers.allowedMethods())
router.use('/home', routerHome.routes(), routerHome.allowedMethods())
router.use('/login', loginRouter.routes(), loginRouter.allowedMethods())

router.redirect('/', '/home')
module.exports = router
